let s = 'Hello, world';

console.log(s.substring(1, 4));

console.log(s.slice(1, 4));

console.log(s.slice(-3));

console.log(s.split(', '));

console.log(s.indexOf('l'));

console.log(s.indexOf('l', 3));

console.log(s.indexOf('zz'));

console.log(s.lastIndexOf('l'));

console.log(s.startsWith('Hell'));

console.log(s.endsWith('!'));

console.log(s.includes('or')); // 包含子串

console.log(s.toLocaleLowerCase());

console.log(s.toLocaleUpperCase());

console.log(s.replace('llo', 'y'));

console.log(s.normalize('NFKD'));

console.log(s.charAt(0));

console.log(s.charAt(s.length-1));

console.log(s.charCodeAt(0));

console.log(s.codePointAt(0));

let x = 'a';

console.log(x.padStart(3));

console.log(x.padEnd(3));

console.log(x.padStart(3, '*'));

console.log(x.padEnd(3, '-'));

console.log(" test ".trim());

console.log(" test ".trimStart());

console.log(" test ".trimEnd());

console.log(s.concat('!'));

console.log('<>'.repeat(3));
